# schemas/sys_organization.py
from pydantic import BaseModel
from typing import Optional
from datetime import date

class SysOrganizationBase(BaseModel):
    org_code: Optional[str] = None
    org_name: Optional[str] = None
    is_org: Optional[int] = None
    Invite_code: Optional[str] = None
    effective_date: Optional[date] = None
    expiry_date: Optional[date] = None

    deletion_mark: Optional[int] = 0
    deletion_reason: Optional[str] = None
    deletion_date: Optional[str] = None
    deletion_by: Optional[str] = None
    creator_by: Optional[str] = None
    last_updated_by: Optional[str] = None

class SysOrganizationCreate(SysOrganizationBase):
    pass

class SysOrganizationUpdate(SysOrganizationBase):
    pass

class SysOrganization(SysOrganizationBase):
    id: str
    create_date: str
    last_updated_date: Optional[str] = None

    class Config:
        from_attributes = True
